來學 React 吧之十_淺談測試


Posted by Christy on 2021-12-15

本文為 [FE302] 淺談測試之react-testing-library 簡介的筆記

測試大概有三種:

  1. unit test

  2. Integration testing

  3. end-to-end testing

react 測試怎麼做?1'07" 測試示範

要測試 react 的 component,通常都用 React Testing Library,這一套比較像是 Integration testing,react 內建的測試檔案 App.test.js,可以直接試試看

Cypress 簡介 -- end-to-end testing

比較接近真實使用者在用的感受,影片示範了怎麼做測試

課程總結:

課程裡面提到了

  • hook 用法

  • React 思考模式

  • class component 稍微了解一下,如果能夠 function component 與 class component 兩個版本的程式碼都互相轉換,這樣算是不錯,即使未來 class component 已經越來越少了

也學習到了

  • 資料夾結構怎麼排

  • context 使用

  • call api 的時機點

  • 身份驗證的部分

  • 測試










Related Posts

[ 實作問題 ] 部署使用 Nginx 出錯

[ 實作問題 ] 部署使用 Nginx 出錯

[NET101] -1

[NET101] -1

HTTP Request 暫

HTTP Request 暫


Comments